﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>SMEs Customer 360 Degree | </title>
    <link rel="shortcut icon" href="images/favicon.ico" />
    <!-- Bootstrap -->
    <link href="/scripts/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="/scripts/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- PNotify -->
    <link href="/scripts/vendors/pnotify/dist/pnotify.css" rel="stylesheet">
    <link href="/scripts/vendors/pnotify/dist/pnotify.buttons.css" rel="stylesheet">
    <link href="/scripts/vendors/pnotify/dist/pnotify.nonblock.css" rel="stylesheet">
    <!-- Ion.RangeSlider -->
    <link href="/scripts/vendors/normalize-css/normalize.css" rel="stylesheet">
    <link href="/scripts/vendors/ion.rangeSlider/css/ion.rangeSlider.css" rel="stylesheet">
    <link href="/scripts/vendors/ion.rangeSlider/css/ion.rangeSlider.skinFlat.css" rel="stylesheet">
    <!-- Select2 -->
    <link href="/scripts/vendors/select2/dist/css/select2.min.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="/scripts/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
    <!--Table editable-->
    <link href="/scripts/tableeditable/service.flextabledit.jquery.css" rel="stylesheet">
    <!-- Add IntroJs styles -->
    <link href="/Scripts/tourguideintro/introjs.css" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="/content/custom.css" rel="stylesheet">
    <link href="/content/smeCustomerCustom.css" rel="stylesheet">
</head>
<body class="nav-md">
    <div class="container body">
        <div class="main_container">
            <div class="col-md-3 left_col">
                <div class="left_col scroll-view">
                    @if (User.Identity.IsAuthenticated)
                    {
                        @Html.Action("Sidebar", "System")
                    }

                </div>
            </div>
            <!-- top navigation -->
            <div class="top_nav">
                <div class="nav_menu">
                    @if (User.Identity.IsAuthenticated)
                    {
                        @Html.Action("HeaderMenu", "System")
                    }

                </div>
            </div>
            <!-- /top navigation -->
            <!-- page content -->
            <div class="right_col sme_body" role="main">
                @RenderSection("featured", required: false)
                <section class="content-wrapper main-content clear-fix">
                    @RenderBody()
                </section>
            </div>
            <!-- /page content -->
            <!-- footer content -->
            <footer>
                <div class="pull-right">
                    SMEs Customer 360 Degree Template
                </div>
                <div class="clearfix"></div>
            </footer>
            <!-- /footer content -->
        </div>
    </div>
    <div id="custom_notifications" class="custom-notifications dsp_none">
        <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group"></ul>
        <div class="clearfix"></div>
        <div id="notif-group" class="tabbed_notifications"></div>
    </div>
    <!-- jQuery -->
    <script src="/scripts/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="/scripts/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="/scripts/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="/scripts/vendors/nprogress/nprogress.js"></script>
    <!-- ECharts -->
    <script src="/scripts/vendors/echarts/dist/echarts.min.js"></script>
    <!-- Ion.RangeSlider -->
    <script src="/scripts/vendors/ion.rangeSlider/js/ion.rangeSlider.min.js"></script>
    <!-- Select2 -->
    <script src="/scripts/vendors/select2/dist/js/select2.full.min.js"></script>
    <!-- PNotify -->
    <script src="/scripts/vendors/pnotify/dist/pnotify.js"></script>
    <script src="/scripts/vendors/pnotify/dist/pnotify.buttons.js"></script>
    <script src="/scripts/vendors/pnotify/dist/pnotify.nonblock.js"></script>
    <!-- bootstrap-wysiwyg -->
    <script src="/scripts/vendors/bootstrap-wysiwyg/js/bootstrap-wysiwyg.min.js"></script>
    <script src="/scripts/vendors/jquery.hotkeys/jquery.hotkeys.js"></script>
    <script src="/scripts/vendors/google-code-prettify/src/prettify.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="/scripts/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- Datatables -->
    <script src="/scripts/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="/scripts/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="/scripts/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="/scripts/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="/scripts/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="/scripts/vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
    <script src="/scripts/vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="/scripts/vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="/scripts/vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="/scripts/vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="/scripts/vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="/scripts/vendors/datatables.net-scroller/js/datatables.scroller.min.js"></script>
    <script src="/scripts/vendors/jszip/dist/jszip.min.js"></script>
    <script src="/scripts/vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="/scripts/vendors/pdfmake/build/vfs_fonts.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="/scripts/custom.js"></script>

    <!-- bootstrap-wysiwyg -->
    <script>
        $(document).ready(function () {
            function initToolbarBootstrapBindings() {
                var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
                    'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times',
                    'Times New Roman', 'Verdana'
                ],
                  fontTarget = $('[title=Font]').siblings('.dropdown-menu');
                $.each(fonts, function (idx, fontName) {
                    fontTarget.append($('<li><a data-edit="fontName ' + fontName + '" style="font-family:\'' + fontName + '\'">' + fontName + '</a></li>'));
                });
                $('a[title]').tooltip({
                    container: 'body'
                });
                $('.dropdown-menu input').click(function () {
                    return false;
                })
                  .change(function () {
                      $(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');
                  })
                  .keydown('esc', function () {
                      this.value = '';
                      $(this).change();
                  });

                $('[data-role=magic-overlay]').each(function () {
                    var overlay = $(this),
                      target = $(overlay.data('target'));
                    overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
                });

                if ("onwebkitspeechchange" in document.createElement("input")) {
                    var editorOffset = $('#editor').offset();

                    $('.voiceBtn').css('position', 'absolute').offset({
                        top: editorOffset.top,
                        left: editorOffset.left + $('#editor').innerWidth() - 35
                    });
                } else {
                    $('.voiceBtn').hide();
                }
            }

            function showErrorAlert(reason, detail) {
                var msg = '';
                if (reason === 'unsupported-file-type') {
                    msg = "Unsupported format " + detail;
                } else {
                    console.log("error uploading file", reason, detail);
                }
                $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>' +
                  '<strong>File upload error</strong> ' + msg + ' </div>').prependTo('#alerts');
            }

            initToolbarBootstrapBindings();

            $('#editor').wysiwyg({
                fileUploadError: showErrorAlert
            });

            prettyPrint();
        });
    </script>
    <!-- /bootstrap-wysiwyg -->
    <!-- compose -->
    <script>
        $('#compose, .compose-close').click(function () {
            $('.compose').slideToggle();
        });
    </script>
    <!-- /compose -->
    <script type="text/javascript" src="/Scripts/tourguideintro/intro.js"></script>
    <script type="text/javascript">

        function createCookie(name, value, days) {
            if (days) {
                var date = new Date();
                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
                var expires = "; expires=" + date.toGMTString();
            }
            else var expires = "";
            document.cookie = name + "=" + value + expires + "; path=/";
        }

        function readCookie(name) {
            var nameEQ = name + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1, c.length);
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
            }
            return null;
        }

        function eraseCookie(name) {
            createCookie(name, "", -1);
        }

        $(document).ready(function () {
            var x = readCookie('isFirst');
            if (x == null) {
                var introStart = introJs();
                var steps = [{
                    element: '#sidebar-footer',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHelper',
                    position: 'top'
                }];
                introStart.setOptions({
                    steps: steps,
                    scrollToElement: false,
                });
                introStart.start();
                createCookie('isFirst', true, 30);
            }
        });


        function decodeHtml(html) {
            var txt = document.createElement("textarea");
            txt.innerHTML = html;
            return txt.value;
        }

        function startTourGuide() {
            var intro = introJs();
            var steps = [{
                element: '#sme-logo',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideLogo'
            }, {
                element: '#sme-dao-info',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideDaoInfo',
                position: 'right'
            }, {
                element: '#smes_sidebar_quick_link_tc',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideQuickLinkTotalCustomer',
                position: 'right'
            }, {
                element: '#smes_sidebar_quick_link_nc',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideQuickLinkNewCustomer',
                position: 'right',
            }, {
                element: '#smes_sidebar_quick_link_c',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideQuickLinkCelebration',
                position: 'right'
            }, {
                element: '#smes_sidebar_quick_link_ac',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideQuickLinkAlert',
                position: 'right'
            }, {
                element: '#smes_sidebar_quick_link_top',
                intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideQuickLinkTop10',
                position: 'right'
            }];
            if ($('#sme-header-total-cust').length > 0) {
                steps.push({
                    element: '#sme-header-total-cust',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderCustMan',
                    position: 'bottom'
                });
            }
            if ($('#sme-header-sale-perform').length > 0) {
                steps.push({
                    element: '#sme-header-sale-perform',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderSalePerform',
                    position: 'bottom'
                });
            }
            if ($('#sme-header-port-man').length > 0) {
                steps.push({
                    element: '#sme-header-port-man',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderPortMan',
                    position: 'bottom'
                });
            }
            if ($('#sme-header-sale-act').length > 0) {
                steps.push({
                    element: '#sme-header-sale-act',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderSaleAct',
                    position: 'bottom'
                });
            }
            if ($('#sme-header-alert').length > 0) {
                steps.push({
                    element: '#sme-header-alert',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderAlert',
                    position: 'bottom'
                });
            }
            if ($('#sme-header-cust-detail').length > 0) {
                steps.push({
                    element: '#sme-header-cust-detail',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderCustDetail',
                    position: 'bottom'
                });
            }
            if ($('#sme-header-imex').length > 0) {
                steps.push({
                    element: '#sme-header-imex',
                    intro: '@SMEsCustomer360Degree.Core.Resources.Resource.TourGuideHeaderIMEX',
                    position: 'left'
                });
            }
            intro.setOptions({
                steps: steps,
                showProgress: true,
                scrollToElement: true,
            });
            intro.setOption('tooltipPosition', 'auto');
            intro.setOption('positionPrecedence', ['left', 'right', 'bottom', 'top'])
            intro.start();
        }
    </script>
    @RenderSection("scripts", required: false)
</body>
</html>
